import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Home from '@/components/Home'
import Room from '@/components/Room'
import Server from '@/components/Server'
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Home',
      title: "首页",
      component: Home
    },
    {
      path: '/room',
      name: 'room',
      title: "预订房间",
      component: Room
    },
    {
      path: '/server',
      name: 'server',
      title: "维修记录",
      component: Server
    }
  ]
})


const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
